#ifndef MOSQUITTO_H
#define MOSQUITTO_H
//MQTT的订阅者
#include <iostream>
#include <cstring>
#include <mosquitto.h>
#include <unistd.h>

class Mosquitto
{
public:
    Mosquitto();      //通过这个默认构造函数对MQTT订阅者进行初始化
    ~Mosquitto() = default;  //默认的析造函数 
 //   void create_MQTTCLIENT();
    void connect_MQTTCLIENT( struct mosquitto* mosq,const char* username,
    const char* password);
    void message_MQTTCLIENT();
    void mosquitto_connect_callback_set(struct mosquitto* mosq,void (*on_connect)(struct mosquitto*, void*, int));
    void mosquitto_message_callback_set(struct mosquitto* mosq,void (*on_message)(struct mosquitto*, void*, const struct mosquitto_message*));
    void mosquitto_disconnect_callback_set(struct mosquitto* mosq,void (*on_disconnect)(struct mosquitto*, void*, int));
private:
   struct mosquitto* m_MQTTCLIENT;

};


#endif